package com.smfx.yxt.common.enums;

/**
 * 调课状态
 * @author hqm
 *
 */
public enum OfficialApplyStatus {
	
	AGREE("000","审批通过"),
	PENDING("001","待处理"),
	OFFICE_AUDITING("002","办公室审批中"),
	PRINCIPAL_REJECT("003","审批驳回"),
	APPLY_EXPIRE("004","申请失效");

	private final String code;
	
	private final String value;
	
	private OfficialApplyStatus(String code, String value) {
		this.code = code;
		this.value = value;
	}

	public static String getValue(String key) {
		for(OfficialApplyStatus type : OfficialApplyStatus.values()) {
			if(type.getCode().equals(key)) {
				return type.getValue();
			}
		}
		return "";
	}
	
	public static String getNextValue(String key) {
		if(OfficialApplyStatus.PENDING.getCode().equals(key)) {
			return "等待校长审批中";
		}
		return getValue(key);
	}
	
	public String getCode() {
		return code;
	}

	public String getValue() {
		return value;
	}
	
}
